package com.xxiongb.business.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import com.xxiongb.business.repository.entity.User;


public interface UserRepository extends MongoRepository<User, String> {
	@Query(value="{ 'firstname' : ?0 }", fields="{ 'firstname' : 1, 'lastname' : 1}")
	List<User> findByThePersonsFirstname(String firstname);
	 
	Page<User> findByEmailAndAppIndexAndAccountStatus(String email, int appIndex,int AccountStatus, Pageable pageable);
}
